#include <iostream>
#include <unordered_set>
using namespace std;

int main() {
    int N;
    cin >> N;
    unordered_set<int> values;
    for (int n = 1; n <= N; ++n) {
        int result = n / 2 + n / 3 + n / 5;
        values.insert(result);
    }
    cout << values.size();
    return 0;
} 